﻿@model Orchard.Body.ViewModels.BodyPartViewModel
@inject Orchard.Tokens.Services.ITokenizer Tokenizer

@{ 
    string body = Model.Body;

    if (Model.TypePartSettings.RenderTokens)
    {
        var context = Tokenizer.CreateViewModel().Content(Model.BodyPart.ContentItem);
        body = Tokenizer.Tokenize(body, context);
    }
}

@Html.Raw(body)
